﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace BeautyTech.WebSite
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                 name: "Catalog",
                 url: "{section}~{id}",
                 defaults: new { controller = "Catalog", action = "Index", section = UrlParameter.Optional, id = UrlParameter.Optional },
                 namespaces: new[] { "BeautyTech.WebSite.Controllers" } 
             );
            
           /* routes.MapRoute(
                name: "Blog",
                url: "Blog/Page{page}",
                defaults: new { Controller = "Blog", action = "Index" },
                namespaces: new[] { "BeautyTech.WebSite.Controllers" } 
            ); */

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new[] { "BeautyTech.WebSite.Controllers" } 
            );


        }
    }
}